# -*- coding: UTF-8 -*-
from modem import sms
import utime as time


def sms_cb(args):
    #字符串
    ind_flag = args[0]
    mes_buf = args[1]
    mes_num = args[2]
    # print("type of mes_buf:",type(mes_buf))
    print('new message:ind_flag:{},mes_buf:{},mes_num:{}'.format(ind_flag,mes_buf,mes_num))

if __name__ == '__main__':
    #实例化
    smss = sms()
    #接收短信回调
    print('--------------')
    time.sleep(5)
    smss.setCallback(sms_cb)
